xen: arm: TCR_EL1 is 64-bit on arm64
authorIan Campbell <ian.campbell@citrix.com>
Tue, 3 Dec 2013 15:13:36 +0000 (15:13 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 4 Dec 2013 14:32:19 +0000 (14:32 +0000)
commit17d34efd6751f93bec943ccc8f5b8c56c8fbb483
treee7bcfcac882f85db0d10a0455fe4a6309dda0cfc
parent375c911acc373b4765c0b6e53203e37ae4eb3745
xen: arm: TCR_EL1 is 64-bit on arm64

Storing it in a 32-bit variable in struct arch_vcpu caused breakage over
context switch.

There were also several other places which stored this as the 32-bit value.
Update them all.

The "struct vcpu_guest_context" case needs special consideration. This struct
is in theory is exposed to guests, via the VCPUOP_initialise hypercall.
However as discussed in
http://lists.xen.org/archives/html/xen-devel/2013-10/msg00912.html this isn't
really a guest visible interface since ARM uses PSCI for VCPU bringup
(VCPUOP_initialise simply isn't available) The other users of this interface
are the domctls, which are not a stable API. Therefore while fixing the ttbcr
size also surround the struct in ifdefs to restrict the struct to the
hypervisor and the tools only (omitting the extra complexity of renaming as I
suggested in the referenced thread).

NB TCR_EL1 on arm64 is known as TTBCR on arm32, hence the apparent naming
inconsistencies.

Spotted-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Cc: Anup Patel <anup.patel@linaro.org>
Cc: patches@linaro.org
Cc: patches@apm.com
tools/include/xen-foreign/reference.size
tools/xentrace/xenctx.c
xen/arch/arm/traps.c
xen/include/asm-arm/domain.h
xen/include/public/arch-arm.h